%%
%% shows the beam code of 
%%   - record syntax type checks
%%   - BIF based record type checks
%%   - class syntax type checks
%%
-compile(['S']).

-module(recbifs).
-record(rec, {a, b, c}).
-include("class1.class.hrl").

-export([rec/1, rec0/1, rec2/1, tuple/1, class/1, zizi/1]).

rec(A) ->
    #rec{} = A.

rec0(A) ->
    is_record(A, rec).

rec2(A) when is_record(A, rec) ->
    A.

tuple(A) ->
    true = is_tuple(A),
    3 = tuple_size(A),
    rec = element(1, A).

class(A) ->
    #class1{} = A.

zizi(A) ->
    case is_tuple(A) of
    true -> ok
    end,
    ok.